package com.shxy.pojo;

import lombok.Data;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.io.FileUtils;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;

/**
 * 资料信息
 */
@Entity
@Table(name = "t_material")
@Data
public class Material {
    @Id
    @GenericGenerator(name = "jpa-uuid", strategy = "uuid2")
    @GeneratedValue(generator = "jpa-uuid")
    private String id;          //主键
    private String name;       //名称
    private String mType;       //类型
    private String path;        //路径
    private String url;         //url
    private Date addTime;       //添加时间
    private String md5hex;      //md5值
    private int status;         //状态
    private String coverImage;  //封面图

    @Transient
    File file;                  //文件
}
